package com.vivien.example.springbootdemo.service;

import com.vivien.example.springbootdemo.mapper.ClaimreportMapper;
import com.vivien.example.springbootdemo.pojo.Claimreport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class ClaimreportService {
    @Autowired
    private ClaimreportMapper mapper;

    public List<Claimreport> getALl() {
        return mapper.selectList(null);
    }

    public int addOne(Claimreport claimreport) {
        claimreport.setSubmittime(LocalDateTime.now());
        claimreport.setClaimstatus("处理中");
        return mapper.insert(claimreport);
    }
}
